home *** CD-ROM | disk | FTP | other *** search
- /************************************/
- /* File: About.c
- Function: Handles About Dialog
- /************************************/
- /* #include files */
- #include "General.h"
-
- /* Constants */
- #define I_OK 1
-
- /* Static Variables and function prototypes */
- static char ExitDialog;
- static void Refresh_Dialog(DialogPtr AboutDialog);
-
- /* Globals Variables and Function Prototypes */
- void D_About();
-
- /************************************/
- /* Routines */
- /************************************/
-
- /************************************/
- /* static void Refresh_Dialog(AboutDialog)
- bolds default button */
- /************************************/
- static void Refresh_Dialog(AboutDialog)
- DialogPtr AboutDialog;
- {
- Rect tempRect;
- short DType;
- Handle DItem;
-
- GetDItem(AboutDialog,I_OK, &DType, &DItem, &tempRect);
- PenSize(3, 3);
- InsetRect(&tempRect, -4, -4);
- FrameRoundRect(&tempRect, 16, 16);
- PenSize(1, 1);
- } /* static void Refresh_Dialog(AboutDialog) */
-
- /************************************/
- /* void D_About()
- Does About Dialog */
- /************************************/
- void D_About()
- {
- DialogPtr AboutDialog;
- Rect tempRect1, tempRect2;
- short itemHit;
-
- AboutDialog = GetNewDialog(2, NIL, WindowInFront);
-
- tempRect1 = AboutDialog->portRect;
- tempRect2 = screenBits.bounds;
- tempRect2.top += MenuBarHeight();
- PositionRect(&tempRect1, &tempRect2, CENTER, THIRD);
- MoveWindow(AboutDialog, tempRect1.left, tempRect1.top, TRUE);
-
- ShowWindow(AboutDialog);
- SelectWindow(AboutDialog);
- SetPort(AboutDialog);
-
- Refresh_Dialog(AboutDialog);
-
- ExitDialog = FALSE;
-
- do {
- ModalDialog(NIL, &itemHit);
-
- if (itemHit == I_OK ) {
- ExitDialog =TRUE;
- }
- Refresh_Dialog(AboutDialog);
- } while (ExitDialog == FALSE);
-
- DisposDialog(AboutDialog);
- } /* void D_About() */
-
-